window.onload=function(){
    var alltea=JSON.parse(localStorage.NewRoom)
 if(alltea.length<4){
   for (const iterator of alltea) {
       console.log(iterator);
        document.getElementById('myul').innerHTML+=` <li>
               <a href="">
                   <img src="${iterator.img}" alt="">
                   <p>${iterator.name}</p>
                   <hr>
                   <p>￥${iterator.price}</p>
               </a>
           </li>
         `
   }
 }else{
   for(i=0;i<6;i++){
       let iterator=alltea[i]
       console.log(iterator);
       if(i<3){
           document.getElementById('myul').innerHTML+=` <li>
               <a href="">
                   <img src="${iterator.img}" alt="" >
                   <p>${iterator.name}</p>
                   <hr>
                   <p>￥${iterator.price}</p>
               </a>
           </li>
         `
       }else{
           document.getElementById('twoul').innerHTML+=` <li>
               <a href="">
                   <img src="${iterator.img}" alt="">
                   <p>${iterator.name}</p>
                   <hr>
                   <p>￥${iterator.price}</p>
               </a>
           </li>
         `
       }
   }
 }
}
